<template>
  <div id="app">
    <el-switch v-model="multiple" active-color="#13ce66" inactive-color="#ff4949" active-text="多选" inactive-text="单选"> </el-switch>     选中数据：{{selectTreeValue}}
    <div style="width:300px;">
      <ibiz-select-tree  :NodesData="NodesData" v-model="selectTreeValue" :multiple="multiple"></ibiz-select-tree>
    </div>
    <div>
      <ibiz-qr-code :size="200" :margin="20" :whiteMargin="true" logoSrc="https://avatars3.githubusercontent.com/u/12221718?s=460&v=4" :logoRadius="20" :logoMargin="10" url="http://www.baidu.com"></ibiz-qr-code>
    </div>
  </div>
</template>

<script>
import 'element-ui/lib/theme-chalk/index.css';
import {Switch} from 'element-ui';
export default {
  name: 'App',
  components: {
    'el-switch':Switch
  },
  methods: {
  },
  data() {
    return {
      selectTreeValue:'[{"id":"001","label":"某某信息技术股份有限公司"}]',
      multiple: false,
      NodesData : [{
        "children": [],
        "disabled": false,
        "isLeaf": true,
        "id": "001",
        "label": "某某信息技术股份有限公司",
        "code": "001",
        "level": null,
        "filter": ["001"]
      }, {
        "children": [{
          "children": [],
          "disabled": false,
          "isLeaf": true,
          "id": "450100",
          "label": "北京",
          "code": "450100",
          "level": 4501,
          "filter": ["450000", "450100"]
        }, {
          "children": [],
          "disabled": false,
          "isLeaf": true,
          "id": "450200",
          "label": "上海",
          "code": "450200",
          "level": null,
          "filter": ["450000", "450200"]
        }],
        "disabled": true,
        "isLeaf": false,
        "id": "450000",
        "label": "总部",
        "code": "450000",
        "level": 45,
        "filter": ["450000"]
      }, {
        "children": [],
        "disabled": false,
        "isLeaf": true,
        "id": "002",
        "label": "某某客户公司",
        "code": "002",
        "level": null,
        "filter": ["002"]
      }],
    }
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
